package com.party.core.model.wechat;

import com.party.core.model.BaseModel;

/**
 * 微信订阅关系
 * Created by wei.li
 *
 * @date 2017/8/31 0031
 * @time 17:52
 */
public class WechatSubscribe extends BaseModel{

    //公众号编号
    private String appid;

    //关注着编号
    private String openid;

    //subscribe(订阅)、unsubscribe(取消订阅)
    private String status;


    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        WechatSubscribe that = (WechatSubscribe) o;

        if (appid != null ? !appid.equals(that.appid) : that.appid != null) return false;
        if (openid != null ? !openid.equals(that.openid) : that.openid != null) return false;
        return status != null ? status.equals(that.status) : that.status == null;

    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (appid != null ? appid.hashCode() : 0);
        result = 31 * result + (openid != null ? openid.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "WechatSubscribe{" +
                "appid='" + appid + '\'' +
                ", openid='" + openid + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
